{% extends base %}

{% block body %}

{% init table_name = "" %}
{% init error     = "" %}
{% init cost_time = None %}
{% init path      = "" %}
{% init path_list = [] %}
{% init sql       = "" %}
{% init keys      = [] %}

<div class="card">
    <div class="card-title">
        <span>{{T("表结构")}} - {{table_name}}</span>
        <div class="float-right">
            {% include common/button/back_button.html %}
        </div>
    </div>
</div>

<div class="card">
    <div class="card-title">
        <span>字段</span>
    </div>
    <table class="table">
        <tr>
            {% for head_ in column_info.head %}
                <th>{{head_}}</th>
            {% end %} <!-- for end -->
        </tr>

        {% for item in column_info.items %}
            <tr>
                {% for head_ in column_info.head %}
                    <td>{{item.get(head_)}}</td>
                {% end %}
            </tr>
        {% end %}
    </table>
</div>

<div class="card">
    <div class="card-title">
        <span>索引</span>
    </div>
    <table class="table">
        <tr>
            {% for head_ in index_info.head %}
                <th>{{head_}}</th>
            {% end %} <!-- for end -->
        </tr>

        {% for item in index_info.items %}
            <tr>
                {% for head_ in index_info.head %}
                    <td>{{item.get(head_)}}</td>
                {% end %}
            </tr>
        {% end %}
    </table>
</div>

{% end %}

{% block body_right %}
    {% include common/sidebar/default.html %}
{% end %}
